-- Path of Building
--
-- Intelligence support gems
-- Skill data (c) Grinding Gear Games
--
local skills, mod, flag, skill = ...

#skill SupportAddedChaosDamage
#mods

#skill SupportAddedChaosDamagePlus
	statMap = {
		["supported_active_skill_gem_level_+"] = {
			mod("SupportedGemProperty", "LIST", { keyword = "active_skill", key = "level", value = nil }),
		},
	},
#mods

#skill SupportAddedLightningDamage
#mods

#skill SupportAddedLightningDamagePlus
	statMap = {
		["supported_lightning_skill_gem_level_+"] = {
			mod("SupportedGemProperty", "LIST", { keyword = "active_skill", key = "level", value = nil }, 0, 0, { type = "SkillType", skillType = SkillType.LightningSkill }),
		},
	},
#mods

#skill SupportArcaneSurge
	statMap = {
		["support_arcane_surge_cast_speed_+%"] = {
			mod("Speed", "INC", nil, ModFlag.Cast, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Arcane Surge" }),
		},
		["support_arcane_surge_mana_regeneration_rate_per_minute_%"] = {
			mod("ManaRegenPercent", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Arcane Surge" }),
			div = 60,
		},
		["support_arcane_surge_spell_damage_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Spell, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Arcane Surge" }),
		},
		["support_arcane_surge_spell_damage_+%_final_while_you_have_arcane_surge"] = {
			mod("Damage", "MORE", nil, ModFlag.Spell, 0, { type = "Condition", var = "AffectedByArcaneSurge" }),
		},
	},
#mods

#skill SupportArchmage
	statMap = {
		["manaweave_cost_equals_%_unreserved_mana"] = {
			skill("baseManaCostIsAtLeastPercentUnreservedMana", nil),
		},
		["manaweave_added_lightning_damage_%_cost_if_payable"] = {
			mod("LightningMin", "BASE", nil, 0, 0, { type = "PerStat", stat = "ManaCost" }),
			mod("LightningMax", "BASE", nil, 0, 0, { type = "PerStat", stat = "ManaCost" }),
			div = 100,
		},
	},
#mods

#skill SupportBlasphemy
#mods

#skill SupportBlasphemyPlus
#mods

#skill SupportBonechill
	statMap = {
		["support_chills_also_grant_cold_damage_taken_per_minute_+%"] = {
			mod("ColdDamageTakenOverTime", "INC", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Bonechill", effectEnemyCond = "Chilled" }),
		},
	},
#mods

#skill SupportCastOnStunned
#mods

#skill SupportCastWhileChannelling
	statMap = {
		["cast_while_channelling_time_ms"] = {
			skill("timeOverride", nil, { type = "SkillType", skillType = SkillType.Triggerable }),
			div = 1000,
		},
	},
#mods

#skill SupportCastWhileChannellingTriggered
	statMap = {
		["support_cast_while_channelling_triggered_skill_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, 0, { type = "SkillType", skillType = SkillType.Triggerable }),
		},
	},
#mods

#skill SupportCastWhileChannellingPlus
	statMap = {
		["cast_while_channelling_time_ms"] = {
			skill("timeOverride", nil, { type = "SkillType", skillType = SkillType.Triggerable }),
			div = 1000,
		},
	},
#mods

#skill SupportCastWhileChannellingTriggeredPlus
	statMap = {
		["support_cast_while_channelling_triggered_skill_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, 0, { type = "SkillType", skillType = SkillType.Triggerable }),
		},
	},
#mods

#skill SupportChanceToIgnite
	statMap = {
		["support_chance_to_ignite_fire_damage_+%_final"] = {
			mod("FireDamage", "MORE", nil),
		},
		["ignites_apply_fire_resistance_+"] = {
			mod("FireResist", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Debuff", effectName = "Combustion" }, { type = "Condition", var = "Ignited" }),
		},
	},
#mods

#skill SupportChargedMines
	statMap = {
		["mine_throwing_speed_+%_per_frenzy_charge"] = {
			mod("MineLayingSpeed", "INC", nil, 0, 0, { type = "Multiplier", var = "FrenzyCharge" }),
		},
		["mine_critical_strike_chance_+%_per_power_charge"] = {
			mod("CritChance", "INC", nil, 0, KeywordFlag.Mine, { type = "Multiplier", var = "PowerCharge" }),
		},
	},
#mods

#skill SupportConcentratedEffect
	statMap = {
		["support_concentrated_effect_skill_area_of_effect_+%_final"] = {
			mod("AreaOfEffect", "MORE", nil),
		},
		["support_area_concentrate_area_damage_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Area),
		},
	},
#mods

#skill SupportControlledDestruction
	statMap = {
		["support_controlled_destruction_spell_damage_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Spell),
		},
	},
#mods

#skill SupportControlledDestructionPlus
	statMap = {
		["support_controlled_destruction_spell_damage_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Spell),
		},
	},
#mods

#skill SupportCurseOnHit
#mods

#skill SupportCurseOnHitPlus
#mods

#skill SupportMinionFocusFire
	statMap = {
		["deathmark_minion_damage_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }),
		},
		["support_minion_focus_fire_damage_+%_final_vs_focussed_target"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }, 0, 0, { type = "Condition", var = "EnemyHasDeathmark" }),
		},
	},
#mods

#skill SupportDecay
#mods

#skill SupportEfficacy
	statMap = {
		["support_efficacy_spell_damage_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Spell),
		},
		["support_efficacy_damage_over_time_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Dot),
		},
	},
#mods

#skill SupportElementalFocus
	statMap = {
		["support_gem_elemental_damage_+%_final"] = {
			mod("ElementalDamage", "MORE", nil),
		},
	},
#mods

#skill SupportElementalFocusPlus
	statMap = {
		["support_gem_elemental_damage_+%_final"] = {
			mod("ElementalDamage", "MORE", nil),
		},
	},
#mods

#skill SupportElementalProliferation
	statMap = {
		["support_elemental_proliferation_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
	},
#mods

#skill SupportEnergyShieldLeech
	statMap = {
		["support_energy_shield_leech_damage_+%_on_full_energy_shield_final"] = {
			mod("Damage", "MORE", nil, 0, 0, { type = "Condition", var = "FullEnergyShield" }),
		},
		["support_energy_shield_leech_damage_+%_while_leeching_energy_shield_final"] = {
			mod("Damage", "MORE", nil, 0, 0, { type = "Condition", var = "LeechingEnergyShield" }),
		},
	},
#mods

#skill SupportAdditionalXP
#mods

#skill SupportFasterCast
#mods

#skill SupportMinionOffensiveStance
	statMap = {
		["support_minion_offensive_stance_minion_damage_+%_final_while_you_have_puppet_master"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }, 0, 0, { type = "Condition", var = "FeedingFrenzyActive" }),
		},
	},
#mods

#skill SupportRemoteMine2
	addFlags = {
		mine = true,
	},
	statMap = {
		["support_remote_mine_2_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
		["support_remote_mine_2_chance_to_deal_double_damage_%_against_enemies_near_mines"] = {
			mod("SelfDoubleDamageChance", "BASE", nil, 0, 0, { type = "Limit", limit = 100 }, { type = "GlobalEffect", effectType = "AuraDebuff", effectName = "High-Impact Mine", effectStackVar = "ActiveMineCount" }),
		},
	},
#mods

#skill SupportIgniteProliferation
	statMap = {
		["support_ignite_prolif_ignite_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, KeywordFlag.Ignite),
		},
	},
#mods

#skill SupportImmolation
#mods

#skill SupportIncreasedAreaOfEffect
#mods

#skill SupportIncreasedAreaOfEffectPlus
	statMap = {
		["inc_aoe_plus_more_area_damage_+%_final"] = {
			mod("Damage", "MORE", nil, ModFlag.Area),
		},
	},
#mods

#skill SupportIncreasedCriticalDamage
#mods

#skill SupportIncreasedCriticalStrikes
#mods

#skill SupportBurningMinions
	statMap = {
		["minion_fire_damage_%_of_maximum_life_taken_per_minute"] = {
			mod("MinionModifier", "LIST", { mod = mod("FireDegen", "BASE", nil, 0, 0, { type = "PerStat", stat = "Life" }, { type = "GlobalEffect", effectType = "Buff" }) }),
			div = 6000,
		},
		["support_minion_instability_minion_base_fire_area_damage_per_minute"] = {
			mod("MinionModifier", "LIST", { mod = mod("Multiplier:InfernalLegionBaseDamage", "BASE", nil) }),
			div = 60,
			mod("ExtraMinionSkill", "LIST", { skillId = "InfernalLegion" }),
		},
	},
#mods

#skill SupportStormBarrier
	statMap = {
		["support_storm_barrier_skill_type_damage_taken_when_hit_+%_final"] = {
			mod("PhysicalDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Channelling", modCond = "PhysicalInfusion" }),
			mod("FireDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Channelling", modCond = "FireInfusion" }),
			mod("ColdDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Channelling", modCond = "ColdInfusion" }),
			mod("LightningDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Channelling", modCond = "LightningInfusion" }),
			mod("ChaosDamageTakenWhenHit", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infused Channelling", modCond = "ChaosInfusion" }),
		},
		["support_storm_barrier_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
		["support_storm_barrier_skill_type_damage_+%_final"] = {
			mod("PhysicalDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infusion", effectCond = "InfusionActive", modCond = "PhysicalInfusion" }),
			mod("FireDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infusion", effectCond = "InfusionActive", modCond = "FireInfusion" }),
			mod("ColdDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infusion", effectCond = "InfusionActive", modCond = "ColdInfusion" }),
			mod("LightningDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infusion", effectCond = "InfusionActive", modCond = "LightningInfusion" }),
			mod("ChaosDamage", "MORE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Infusion", effectCond = "InfusionActive", modCond = "ChaosInfusion" }),
		},
	},
#baseMod flag("Condition:PhysicalInfusion", { type = "SkillType", skillType = SkillType.PhysicalSkill })
#baseMod flag("Condition:FireInfusion", { type = "SkillType", skillType = SkillType.FireSkill })
#baseMod flag("Condition:ColdInfusion", { type = "SkillType", skillType = SkillType.ColdSkill })
#baseMod flag("Condition:LightningInfusion", { type = "SkillType", skillType = SkillType.LightningSkill })
#baseMod flag("Condition:ChaosInfusion", { type = "SkillType", skillType = SkillType.ChaosSkill })
#mods

#skill SupportOnslaughtOnSlayingShockedEnemy
	statMap = {
		["support_innervate_minimum_added_lightning_damage"] = {
			mod("LightningMin", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Innervation", effectCond = "InnervationActive" }),
		},
		["support_innervate_maximum_added_lightning_damage"] = {
			mod("LightningMax", "BASE", nil, 0, 0, { type = "GlobalEffect", effectType = "Buff", effectName = "Innervation", effectCond = "InnervationActive" }),
		},
	},
#mods

#skill SupportHandcastSpellBoost
	statMap = {
		["support_spell_boost_area_damage_+%_final_per_charge"] = {
			mod("Damage", "MORE", nil, ModFlag.Area, 0, { type = "Multiplier", var = "Intensity", limitVar = "IntensityLimit" }),
		},
		["support_spell_boost_area_of_effect_+%_final_per_charge"] = {
			mod("AreaOfEffect", "MORE", nil, 0, 0, { type = "Multiplier", var = "Intensity", limitVar = "IntensityLimit" }),
		},
	},
#baseMod mod("Multiplier:IntensityLimit", "BASE", 4)
#mods

#skill SupportItemRarity
#mods

#skill SupportLightningPenetration
#mods

#skill SupportLightningPenetrationPlus
#mods

#skill SupportMinionDefensiveStance
	statMap = {
		["support_minion_defensive_stance_minion_damage_taken_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("DamageTaken", "MORE", nil) }),
		},
		["support_minion_defensive_stance_minion_damage_+%_final_against_enemies_near_you"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }, 0, 0, { type = "Condition", var = "MeatShieldEnemyNearYou" }),
		},
	},
#mods

#skill SupportMinefield
	statMap = {
		["support_minefield_mine_throwing_speed_+%_final"] = {
			mod("MineLayingSpeed", "MORE", nil),
		},
	},
#mods

#skill SupportMinionDamage
	statMap = {
		["support_minion_damage_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }),
		},
	},
#mods

#skill SupportMinionDamagePlus
	statMap = {
		["support_minion_damage_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("Damage", "MORE", nil) }),
		},
	},
#mods

#skill SupportMinionLife
	statMap = {
		["support_minion_maximum_life_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("Life", "MORE", nil) }),
		},
	},
#mods

#skill SupportMinionSpeed
#mods

#skill SupportSummonElementalResistances
	statMap = {
		["support_minion_totem_resistance_elemental_damage_+%_final"] = {
			mod("MinionModifier", "LIST", { mod = mod("ElementalDamage", "MORE", nil) }),
		},
	},
#mods

#skill SupportPhysicalToLightning
#mods

#skill SupportPowerChargeOnCrit
	statMap = {
		["support_power_charge_on_crit_damage_+%_final_per_power_charge"] = {
			mod("Damage", "MORE", nil, 0, 0, { type = "Multiplier", var = "PowerCharge" }),
		},
	},
#mods

#skill SupportRemoteMine
	addFlags = {
		mine = true,
	},
	statMap = {
		["base_skill_show_average_damage_instead_of_dps"] = {
			skill("showAverage", true, { type = "SkillType", skillType = SkillType.SkillCanMine }),
		},
		["support_gem_mine_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, KeywordFlag.Mine),
		},
	},
#mods

#skill SupportSpellCascade
	statMap = {
		["support_spell_cascade_area_of_effect_+%_final"] = {
			mod("AreaOfEffect", "MORE", nil),
		},
		["support_spell_cascade_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
	},
#mods

#skill SupportSpellCascadePlus
	statMap = {
		["support_spell_cascade_area_of_effect_+%_final"] = {
			mod("AreaOfEffect", "MORE", nil),
		},
		["support_spell_cascade_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
	},
#mods

#skill SupportMulticast
	statMap = {
		["support_echo_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
		["support_multicast_cast_speed_+%_final"] = {
			mod("Speed", "MORE", nil, ModFlag.Cast),
		},
	},
#baseMod flag("Condition:HaveSpellEcho")
#mods

#skill SupportSpellEchoPlus
	statMap = {
		["support_echo_damage_+%_final"] = {
			mod("Damage", "MORE", nil),
		},
		["support_multicast_cast_speed_+%_final"] = {
			mod("Speed", "MORE", nil, ModFlag.Cast),
		},
		["spell_echo_plus_chance_double_damage_%_final"] = {
			mod("DoubleDamageChance", "BASE", nil, ModFlag.Spell, 0),
			div = 2,
		},
	},
#baseMod flag("Condition:HaveSpellEcho")
#baseMod mod("DoubleDamageChance", "BASE", -3, ModFlag.Spell, 0, { type = "Condition", var = "HaveGreaterSpellEcho" })
#mods

#skill SupportSummonGhostOnKill
	addFlags = {
		minion = true,
	},
	addMinionList = {
		"SummonedPhantasm"
	},
	statMap = {
		["base_number_of_support_ghosts_allowed"] = {
			mod("ActivePhantasmLimit", "BASE", nil),
		},
	},
#mods

#skill SupportAilments
	statMap = {
		["support_unbound_ailments_ailment_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, bit.bor(KeywordFlag.Bleed, KeywordFlag.Poison, KeywordFlag.Ignite)),
		},
	},
#mods

#skill SupportUnboundAilmentsPlus
	statMap = {
		["support_unbound_ailments_ailment_damage_+%_final"] = {
			mod("Damage", "MORE", nil, 0, bit.bor(KeywordFlag.Bleed, KeywordFlag.Poison, KeywordFlag.Ignite)),
		},
	},
#mods

#skill SupportHandcastAnticipation
#mods

#skill SupportUnleashPlus
#mods
